<?php
/**
* @package controller
* @file indexController.php
* @date 15.09.2009
* @version 1.0
* @copyright sample
* @author Inayatullah Shareif
* @todo phpDoc comments
*/
require_once 'Zend/Controller/Action.php';

class Home_PlugController extends Cms_Controller_Action
{
	
	public function init()
	{
	  $this->view->gallerythumb = '/'.$this->CONFIG->path->gallerythumb;
	  $this->view->vsmall = '/'.$this->CONFIG->path->vsmallThumb;			
	}
	
	public function rightNavAction() 
	{	
		
	}
	
	public function videoNavAction() 
	{
	$videos = Doctrine::getTable('Video')->getHomeVideo();
	//echo '<pre>';print_r($videos);exit;
	$this->view->videos = $videos;
	
	}
	
	public function memberNavAction() 
	{
		global $institutions,$currentYear,$major;
		$users = Doctrine::getTable('User')->getHomeUsers(4);
		//echo '<pre>';print_r($users);exit;
		$this->view->allUsers = $users;
		$this->view->institutions = $institutions;
		
	}
	
	public function tagCloudAction() 
	{
		$tags = Doctrine::getTable('BigIdea')->getTags();
		//echo "------------------";
		$this->view->tags = $tags;
	}
	
	public function pollNavAction() 
	{
	
	  $listquestions = Doctrine::getTable('Pollquestions')->getPollQuestions();	
	  if(count($listquestions)>0)
	  {
	  $listqid= $listquestions[0]['question_id'] ;
	  }
	   else
	  {
	  	 $listqid=0;
	  }
	  $listoptions = Doctrine::getTable('Polloptions')->getPolloptDetails($listqid);	
	  
	  $this->view->listquestions = $listquestions;
	  $this->view->listoptions = $listoptions;
	}
	
	public function followNavAction() {
	
	}
	
}	
